home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 August
/
Ahoy_Magazine_87-08_1987_Double_L_Side_A.d64
/
Small Straight
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
426b
|
12 lines
0 poke646,0:poke53280,12:poke53281,12
1 rem ==================================
2 rem commodares problem #40-1 :
3 rem small straight
4 rem solution by
5 rem harry stoddart
6 rem ==================================
10 print"the #'s:":for x=1 to 5:r=int(rnd(ti)*5+.5)+1:a(r)=a(r)+1:print r;:next
20 for y=1 to 3:for x=y to y+3:s(y)=s(y)+sgn(a(x)):next x:next y:print
30 print"the small straights are"1234*-(s(1)=4);2345*-(s(2)=4);3456*-(s(3)=4)
40 run